import java.io.*;
import java.nio.charset.StandardCharsets;
import java.util.Scanner;

public class Demo3 {
    public static void main(String[] args) {
        try(InputStream inputStream = new FileInputStream("E:/新建文件夹/测试用例/Demo.txt")) {
            /*byte[] buf = new byte[1024];
            int n = inputStream.read(buf);
            for (int i = 0; i < n; i++) {
                //System.out.println(buf[i]);
                System.out.printf("%x\n",buf[i]);
            }*/
            Scanner scanner = new Scanner(inputStream);
            String s = scanner.next();
            System.out.println(s);
        }  catch (IOException e) {
            throw new RuntimeException(e);
        }

        try(OutputStream outputStream = new FileOutputStream("E:/新建文件夹/测试用例/Demo.txt",true)) {
            /*String s = "090998";
            outputStream.write(s.getBytes());*/
            PrintWriter writer = new PrintWriter(outputStream);
            writer.println("00");
            writer.flush();//刷新缓冲区
        } catch (FileNotFoundException e) {
            throw new RuntimeException(e);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
}
